﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="register.aspx.cs" Inherits="register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>用户注册</title>
    <link href="Common/css/main.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
 div{_behavior: url("Common/css/iepngfix.htc") }
</style> 
    <script type="text/javascript" src="Common/js/jquery.js"></script>
    <script type="text/javascript" src="Common/js/common.js"></script>
    <script type="text/javascript" src="Common/Js/msg.js"></script>
    <script type="text/javascript" src="Common/Js/jsUtil.js"></script>
    <script type="text/javascript">
    
    window.onload = function() {

    }
        
    //  验证用户输入
    function VerifyInput()
    {
        var arr = new Array();
        
        arr.push({id:"<%= txtProvince.ClientID %>",msg:NO_INPUT1});
        arr.push({id:"<%= txtCity.ClientID %>",msg:NO_INPUT2});
        arr.push({id:"<%= txtSchoolName.ClientID %>",msg:NO_INPUT3});
        arr.push({id:"<%= txtPhone.ClientID %>",msg:NO_INPUT4});
        arr.push({id:"<%= txtSn.ClientID %>",msg:NO_INPUT5});
        
        for(var i = 0; i < arr.length; i++)
        {
            var strName = document.getElementById(arr[i].id).value;
            if(strName.replace(/(^\s*)|(\s*$)/g,  "").length < 1) {
                showNoticMsg(arr[i].id, arr[i].msg);
                document.getElementById(arr[i].id).focus();
               return false;
            }
            if(strName.search(/[`~!@#$%^&*+=|\\\][\]\{\}:;\"'\,.<>/?]/g) != -1) {
                showNoticMsg(arr[i].id, arr[i].msg);
                document.getElementById(arr[i].id).focus();
               return false;
            }
        }
     
    	return true;
    }
    
    //  提交注册信息
    function RegisterEvalJs()
    {
        if(!VerifyInput())
            return;

    	PageMethods.RegisterEval(schoolName, province, city, phone, sn,
            function(succ) {
                alert("succ");
            },
            function (err) {
        	    alert("error");
        });
    }
    </script>
<style type="text/css">
<!--
.MustInputStyle {
	font-size: 12px;
	color: #F00;
}
.RegBody {
	border: 1px solid #CCC;
}
.whiteFont {
	color: #FFF;
}
-->
</style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="scriptManager" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <div class="bodyWarp" style="text-align:center;"> <br/>
      <br/>
      <br/>
      <asp:Label ID="labMsg" runat="server" Text="注册失败!" style="color:Red; text-align:left; width:300px;"></asp:Label>
      <br/>
      <br/>
      <table border="0" class="RegBody" style="text-align:center; vertical-align:middle; width: 388px;">
        <tr>
          <td colspan="2" bgcolor="#46C5EE" class="whiteFont"  style="width: 120px;text-align:left; height: 38px; padding-top=10px;" ><h3 style="text-align:left; padding-left=5px;">用户注册</h3>
            </td>
        </tr>
        <tr>
          <td height="30" align="right"> 省：
            <label>
              <!--<select id="selProvince">^[u4e00-u9fa5],{0,}$
                        </select>-->
              <!--<input id="txtProvince" type="text" maxlength="20" style="width: 70px" onkeypress="value.replace(/[^u4E00-u9FA5]/g,'')"/>-->
            </label>
            <label>
              <!--<select id="selCity">
                        </select>-->
              <!--<input id="txtCity" type="text" maxlength="20" style="width: 70px" onkeypress="value.replace(/[^u4E00-u9FA5]/g,'')"/>-->
            </label></td>
          <td align="left"><label> </label>
            <asp:TextBox ID="txtProvince" runat="server" MaxLength="20" Width="109px"></asp:TextBox>&nbsp;<span class="MustInputStyle">*</span>
            市：
            <asp:TextBox ID="txtCity" runat="server" MaxLength="20" Width="117px"></asp:TextBox>            <span class="MustInputStyle">*</span></td>
        </tr>
        <tr>
          <td width="95" height="30" align="right" style="width: 80px; ">学校名称：</td>
          <td width="335" align="left"><asp:TextBox ID="txtSchoolName" runat="server" MaxLength="30" Width="278px"></asp:TextBox>
          <span class="MustInputStyle">*</span></td>
        </tr>

        <tr>
          <td height="30" align="right" style="width: 80px; "> 联系电话：</td>
          <td align="left"><label>
            <!--<input id="txtPhone" maxlength="100" type="text"/>-->
            <asp:TextBox ID="txtPhone" runat="server" MaxLength="20" Width="278px"></asp:TextBox>
          </label><span class="MustInputStyle">*</span></td>
        </tr>
        <tr>
          <td height="30" align="right" style="width: 80px; "> 序 列 号：</td>
          <td align="left"><label>
            <!--<input id="txtSn" type="text" maxlength="20"/>-->
            <asp:TextBox ID="txtSn" runat="server" MaxLength="20" Width="278px"></asp:TextBox>
          </label><span class="MustInputStyle">*</span></td>
        </tr>
        <tr>
          <td height="40" colspan="2" align="center" valign="middle" >
           
            <!--<input id="btnRegister" type="button" value="注册" onclick="return btnRegister_onclick()" />
                    <input id="btnCancel" type="button" value="取消" onclick="return btnCancel_onclick()" />-->
            <asp:Button class="commonBut" ID="btnRegister" runat="server" Text="注册" onclientclick="return VerifyInput();" OnClick="btnRegister_Click"/>        
            <!--<asp:Button class="commonBut" ID="btnCancel" runat="server" Text="重置" />-->
            <input class="commonBut" id="btnCancel" type="reset"value="重置" /></td>
        </tr>
      </table>
    </div>
    </form>
</body>
</html>
